/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package pe.com.minam.beans;

import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Alvaro
 */
@Entity
@Table(name = "SCAMAP_RESPONSABLE")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "ScamapResponsable.findAll", query = "SELECT s FROM ScamapResponsable s"),
    @NamedQuery(name = "ScamapResponsable.findByIdResp", query = "SELECT s FROM ScamapResponsable s WHERE s.idResp = :idResp"),
    @NamedQuery(name = "ScamapResponsable.findByVNomResp", query = "SELECT s FROM ScamapResponsable s WHERE s.vNomResp = :vNomResp"),
    @NamedQuery(name = "ScamapResponsable.findByVApep", query = "SELECT s FROM ScamapResponsable s WHERE s.vApep = :vApep"),
    @NamedQuery(name = "ScamapResponsable.findByVApem", query = "SELECT s FROM ScamapResponsable s WHERE s.vApem = :vApem"),
    @NamedQuery(name = "ScamapResponsable.findByVTelefono", query = "SELECT s FROM ScamapResponsable s WHERE s.vTelefono = :vTelefono"),
    @NamedQuery(name = "ScamapResponsable.findByVCorreo", query = "SELECT s FROM ScamapResponsable s WHERE s.vCorreo = :vCorreo"),
    @NamedQuery(name = "ScamapResponsable.findByIdCargo", query = "SELECT s FROM ScamapResponsable s WHERE s.idCargo = :idCargo")})
public class ScamapResponsable implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_RESP")
    private BigDecimal idResp;
    @Size(max = 30)
    @Column(name = "V_NOM_RESP")
    private String vNomResp;
    @Size(max = 30)
    @Column(name = "V_APEP")
    private String vApep;
    @Size(max = 30)
    @Column(name = "V_APEM")
    private String vApem;
    @Size(max = 20)
    @Column(name = "V_TELEFONO")
    private String vTelefono;
    @Size(max = 50)
    @Column(name = "V_CORREO")
    private String vCorreo;
    @Column(name = "ID_CARGO")
    private BigInteger idCargo;

    public ScamapResponsable() {
    }

    public ScamapResponsable(BigDecimal idResp) {
        this.idResp = idResp;
    }

    public BigDecimal getIdResp() {
        return idResp;
    }

    public void setIdResp(BigDecimal idResp) {
        this.idResp = idResp;
    }

    public String getVNomResp() {
        return vNomResp;
    }

    public void setVNomResp(String vNomResp) {
        this.vNomResp = vNomResp;
    }

    public String getVApep() {
        return vApep;
    }

    public void setVApep(String vApep) {
        this.vApep = vApep;
    }

    public String getVApem() {
        return vApem;
    }

    public void setVApem(String vApem) {
        this.vApem = vApem;
    }

    public String getVTelefono() {
        return vTelefono;
    }

    public void setVTelefono(String vTelefono) {
        this.vTelefono = vTelefono;
    }

    public String getVCorreo() {
        return vCorreo;
    }

    public void setVCorreo(String vCorreo) {
        this.vCorreo = vCorreo;
    }

    public BigInteger getIdCargo() {
        return idCargo;
    }

    public void setIdCargo(BigInteger idCargo) {
        this.idCargo = idCargo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idResp != null ? idResp.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ScamapResponsable)) {
            return false;
        }
        ScamapResponsable other = (ScamapResponsable) object;
        if ((this.idResp == null && other.idResp != null) || (this.idResp != null && !this.idResp.equals(other.idResp))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "pe.com.minam.beans.ScamapResponsable[ idResp=" + idResp + " ]";
    }
    
}
